package com.iakuil.app.common.redis.base;

import com.iakuil.app.common.core.constant.SysConstant;
import org.springframework.data.redis.connection.MessageListener;
import org.springframework.data.redis.listener.ChannelTopic;
import org.springframework.data.redis.listener.Topic;

/**
 * Redis MessageListener with topic
 *
 * @author Kai
 */
public interface RedisTopicListener extends MessageListener {

    /**
     * 配置Channel主题
     *
     * @return Channel主题
     */
    default Topic getTopic() {
        return new ChannelTopic(SysConstant.APP_SYMBOL + ":test:default");
    }
}
